<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>管理员登录页</title>
    <!--  <meta name="renderer" content="webkit|ie-comp|ie-stand">-->
    <!--  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">-->
    <!--  <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />-->
    <!--  <meta http-equiv="Cache-Control" content="no-siteapp" />-->

    <!--    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />-->
    <!--    <link rel="stylesheet" href="../../css/font.css" type="text/css">-->
    <link rel="stylesheet" href="css/login_reg.css" type="text/css">
    <!--    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>-->
    <!--    <script src="../lib/layui/layui.js" charset="utf-8"></script>-->
    <!--    <script type="text/javascript" src="../js/xadmin.js"></script>-->
    <script src="../js/jquery-1.11.0.min.js"></script>
    <style>
        .errorMsg {
            margin: 0 auto;
            padding: 6px 10px;
            border: 1px solid transparent;
            text-align: left;
            color: #579c55;
            background-color: #d1ebcc;
            border-color: #d1ebcc;
            margin-bottom: 17px;
            font-size: 12px;
        }
    </style>
    <script>
        //页面加载函数
        $(function () {
            //1.当表单提交时，调用所有校验方法
            $("#loginForm").submit(function () {
//发送数据到服务器 - 确定请求方式
                $.post("/music/user/login",
                    $(this).serialize(),//用户提交的参数
                    function (data) {
                        if (data.flag) {
                            location.href = "index.html";
                        } else {
                            $("#errorMsg").html(data.errorMsg);
                        }
                    });
                return false;
            });
        });
    </script>
</head>
<body class="login-bg">

<div class="login">
    <div class="message">用户登录
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a class="message" href="../adminHtml/adminlogin.html">管理员登录</a>
    </div>
    <div id="darkbannerwrap"></div>
    <form id="loginForm" class="layui-form" action="" method="post">
        <input name="userName" placeholder="用户用户名" type="text">
        <hr class="hr15">
        <input name="userPwd" placeholder="用户密码" type="password">
        <hr class="hr15">
        <input value="用户登录" style="width:100%;" type="submit">
        <hr class="hr20">
    </form>
    <div id="errorMsg" class="errorMsg" ></div>
    <div>
        <a href="register.html" style="float: left">立即注册</a>
        <a href="forget.html" style="float: right">忘记密码</a>
    </div>
</div>


<!-- 底部结束 -->
</body>
</html>